Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding environment checks to pawsey lua for handling errors #220

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pelahi
Copy link
Collaborator

@pelahi pelahi commented Aug 31, 2023

There are a number of tickets reporting an issue with the pawseyenv module. These are misleading errors because there isn't an issue with the module per say, rather that there are issues with some environment variables that are undefined. This PR is draft but with some feedback could be integrated into the deployment.

@pelahi pelahi added the enhancement New feature or request label Aug 31, 2023
Copy link
Contributor

@marcodelapierre marcodelapierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good! just one comment

for ind,var in ipairs(envvars) do
local env = os.getenv(var)
if env == nil or env == "" then
nid = os.getenv("HOSTNAME")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if HOSTNAME itself is not set? -- as unlikely as HOME/USER I reckon.

maybe you could substitute with a Lua command that executes the hostname command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants